package exp2.src;

import java.util.Scanner;
public class calculator{
    public static float Calculate(float a,float b,char symbol1){
	    float result=0;
switch (symbol1)
{
        case '+':
        result = a + b;
        break;
        case '-':
        result = a - b;
        break;
        case '*':
        result = a * b;
        break;
        case '/':
        result = a / b;
        break;
        default:
        System.out.println("Unknown symbol.");
}
return result;
}
}
